package com.taxi.service;

import com.taxi.dto.DriverUser;
import com.taxi.dto.DriverUserWorkStatus;
import com.taxi.remote.ServiceDriverUserClient;
import com.taxi.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: aniu
 * @Date: 2023/9/28
 * @ClassName: UserService
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@Service
public class UserService {
    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;
    public Result updateUser(DriverUser driverUser) {
        return serviceDriverUserClient.addOrUpdateDriverUser(driverUser);
    }

    public Result getDriverUser(Long driverId) {
        return serviceDriverUserClient.getDriverInfo(driverId);
    }

    public Result changeWorkStatus(DriverUserWorkStatus driverUserWorkStatus) {
        return serviceDriverUserClient.changeWorkStatus(driverUserWorkStatus);
    }


    public Result getDriverCarRelationShipByDriverPhone(String driverPhone) {
        return serviceDriverUserClient.getDriverCarRelationShip(driverPhone);
    }

    public Result getWorkStatus(Long driverId) {
        return serviceDriverUserClient.getWorkStatus(driverId);
    }
}
